import request from '@/utils/request'

export const add = data => request({ url: '/role/add', method: 'POST', data })

export const getList = params => request({ url: '/role/list', method: 'GET', params })

export const edit = data => request({ url: '/role/edit', method: 'PUT', data })

export const remove = ids => request({ url: '/role/remove', method: 'DELETE', data: { ids } })
// 设置权限接口
export const setPermission = data => request({ url: '/role/set/permission', method: 'POST', data })
// 获取已添加的权限接口
export const getPermission = id => request({ url: '/role/get/permission', method: 'GET', params: { id } })
